<?php


namespace App\Http\Requests\Api;


use App\Http\Requests\BaseFormRequest;

class SubAccountCreateFormRequest extends BaseFormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $id = $this->get('id', 0);
        if ($id) {
            return [
                'wallet' => ['required'],
            ];
        }
        return [
            'coin' => ['required'],
            'name' => ['required'],
            'wallet' => ['required']
        ];
    }


    public function messages()
    {
        return __('system.sms_verification_code.validation');
    }
}